;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages kyua)
  #:use-module (guix build-system gnu)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages pkg-config)
  #:use-module ((guixrus packages atf) #:prefix rus:)
  #:use-module ((guixrus packages lua) #:prefix rus:)
  #:use-module ((guixrus contributors) #:prefix contributor:))

(define-public kyua
  ;; The last tag was in 2016; the last commit was in 2019.
  (let ((commit "a685f911237e7badddbfb71f1301f640c71673d0")
        (revision "0"))
    (package
     (name "kyua")
     (version (git-version "0.13" revision commit))
     (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/jmmv/kyua")
                    (commit commit)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "174swi6fz5xhh9rvhzlqfg1ka06hh1aaj46mvi871mvqiwhh8psi"))))
     (build-system gnu-build-system)
     (arguments
      ;; Test scripts seem to try to run `kyua --version`; the Kyua CLI provides
      ;; no such flag.
      (list #:tests? #f))
     (inputs (list lua-5.2 rus:lutok sqlite))
     (native-inputs (list rus:atf autoconf automake libtool pkg-config))
     (home-page "https://github.com/jmmv/kyua")
     (synopsis "Testing framework for infrastructure software")
     (description "Kyua is a testing framework for infrastructure software,
originally designed to equip BSD-based operating systems with a test suite.

It features a test suite definition language, a runtime engine for test suites
and a powerful report generation engine.

It is for both developers and users, from the developer applying a simple fix to
a library to the system administrator deploying a new release on a production
machine.")
     (license license:bsd-3)
     (properties `((maintainers . (,contributor:unmatched-paren)))))))
